//
// Created by ASUS on 2024/12/5/星期四.
//
// Problem: G2. Ruler (hard version)
// Contest: Codeforces - Codeforces Round 964 (Div. 4)
// URL: https://codeforces.com/contest/1999/problem/G2
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// DateTime : 2024-12-04 15:41:30
// Author : sunyafei
//
// Powered by CP Editor (https://cpeditor.org)

#include <bits/stdc++.h>
using namespace std;

#define int long long

void solve(){
	int l=2,r=999;
	while(r-l>1){
		int mid1=(2*l+r)/3,mid2=(2*r+l)/3;
		cout<<"? "<<mid1<<" "<<mid2<<endl;
		int res;
		cin>>res;
		if(res==(mid1+1)*(mid2+1)){
			r=mid1;
		}else if(res==mid1*(mid2+1)){
			l=mid1+1;
			r=mid2;
		}else {
			l=mid2+1;
		}
	}
	if(r-l==1){
		cout<<"? 1 "<<l<<endl;
		int res;
		cin>>res;
		if (res==l) {
			l++;
		}else{
			r=l+1;
		}
	}
	cout<<"! "<<l<<endl;
}

signed main(){
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	int t=1;
	cin>>t;
	while(t--){
		solve();
		if(t)cout<<"\n";
	}
	return 0;
}
